import org.junit.Test;

import java.util.Arrays;
import java.util.Collection;

public class ArraysTest {

    @Test
    public void testArrays() {
        String[] array = new String[]{"a","b","c"};
        Collection c1 = Arrays.asList(array);
        System.out.println(c1);
        //相互转换
        System.out.println(c1.toArray());
    }

    @Test
    public void faceTest() {
        int[] arr1 = new int[]{1,2,3};
        Integer[] arr2 = new Integer[]{1,2,3};

        //asList接受的参数是对象，基本数据类型会被认为一个对象，Integer是一个一个的对象
        System.out.println(Arrays.asList(arr1).size()); //1
        System.out.println(Arrays.asList(arr2).size());  //3

    }
}
